<?php


namespace App\Logic;


use App\Models\Residential;

class HousingLogic
{
    public static function search($keyword)
    {
        if(isset($keyword) && !empty($keyword))
        {
            $where[]=['address','like',"%$keyword%"];
            $data=Residential::GetHouse($where);
            return $data;
        }
        $data=Residential::get()->toArray();
        return $data;
    }
}
